@extends('admin.layout.main')

@section('content')
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
<ul class="breadcrumb">
	<li>
		<i class="ace-icon fa fa-home home-icon"></i>
		<a href="#">错误管理</a>
	</li>
	<li class="active"><a href="{{ url('admin/error_list') }}">错误记录列表</a></li>
</ul><!-- /.breadcrumb -->

<div class="nav-search" id="nav-search">
	{{--<form class="form-search">--}}
		{{--<span class="input-icon">--}}
		{{--<input type="text" placeholder="搜索" class="nav-search-input" id="nav-search-input" autocomplete="off" />--}}
			{{--<i class="ace-icon fa fa-search nav-search-icon"></i>--}}
		{{--</span>--}}
	{{--</form>--}}
</div><!-- /.nav-search -->
</div>
<form class="form-search" action="/admin/error_list" method="post">
	<span class="page-content">选择清理时间：</span>
	<span class="input-icon">
        <input type="hidden" name="_token" value="{{csrf_token()}}"/>
        <select name="type" id="">
			<option value="1">前两天</option>
			<option value="2">所有</option>
        </select>
	</span>
	<button class="btn btn-info" type="submit" >
		清理
	</button>
	</span>
</form>

<div class="page-content">
	<div class="row">
		<div class="col-xs-12">
			<!-- PAGE CONTENT BEGINS -->
			<div class="row">
				<div class="col-xs-12">
					<div class="clearfix">
						<div class="pull-right tableTools-container"></div>
					</div>

					<!-- div.table-responsive -->

					<!-- div.dataTables_borderWrap -->
					<div>
						<table id="dynamic-table" class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
									<th>序号</th>
									<th>用户账号</th>
									<th>系统版本</th>
									<th>SDK版本</th>
									<th>手机厂商</th>
									<th>app版本</th>
									<th>异常信息</th>
									<th>设备</th>
									<th>
										<i class="ace-icon fa fa-clock-o bigger-110 hidden-480"></i>
										时间
									</th>
									<th class="hidden-480">操作</th>
								</tr>
							</thead>

							<tbody>
							@if(collect($list)->count() > 0)
							@foreach($list as $key=>$val)
								<tr>
									<td align="center"><a href="#">{{$key+1}}</a></td>
									<td  align="center">{{$val['user']}}</td>
									<td align="center">{{$val['OS_Version']}}</td>
									<td  align="center">{{$val['SDK_Version']}}</td>
									<td align="center">{{$val['vendor']}}</td>
									<td align="center">{{$val['APP_Version']}}</td>
									<td align="center">{{$val['ex_info']}}</td>
									<td align="center">{{\App\Models\Error::$type[$val['type']]}}</td>
									<td align="center">{{$val['time']}}</td>
									<td><div class="hidden-sm hidden-xs action-buttons">

											<a class="green" href="log_info?id={{$val['id']}}">
												<i class="ace-icon fa fa-search-plus bigger-130"></i>
											</a>

										</div>

										<div class="hidden-md hidden-lg">
											<div class="inline pos-rel">
												<button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown" data-position="auto">
													<i class="ace-icon fa fa-caret-down icon-only bigger-120"></i>
												</button>

												<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">


													<li>
														<a href="#" class="tooltip-success" data-rel="tooltip" title="Edit">
															<span class="green">
																<i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
															</span>
														</a>
													</li>

												</ul>
											</div>
										</div>
									</td>
								</tr>
							@endforeach
							@endif

							</tbody>
						</table>
					</div>
				</div>
			</div>
			<!-- PAGE CONTENT ENDS -->
		</div><!-- /.col -->

		<div class="modal-footer no-margin-top">

			{{ $data->links() }}
		</div>
	</div><!-- /.row -->
</div><!-- /.page-content -->

@endsection
